package gptma.fo.controler.request;

import gptma.bo.model.request.ClientRequest;
import gptma.bo.services.request.ClientRequestServices;
import gptma.fo.cdi.ViewScoped;
import gptma.fo.controler.ResultPage;

import java.io.Serializable;

import javax.ejb.EJB;
import javax.inject.Named;

@Named
@ViewScoped
public class RequestListPage extends ResultPage<ClientRequest> implements
		Serializable {

	private static final long serialVersionUID = -8514423113952124971L;

	@EJB
	private ClientRequestServices clientRequestServices;

	public void initializeListPage() {
		results = clientRequestServices.findNewRequests(20);
	}

	public void initializeNonHandledPage() {
		results = clientRequestServices.findToBeTreated();
	}

	public void initializeNonAttachedPage() {
		results = clientRequestServices.findNonAttached();
	}

}
